<template >
  <div class="home" >
      <div class="home-box">
      <Homebox 
      v-for="(v, i) in list" 
      :key="i" 
      :v="v"  
      @headClick="Godetail(v.id)"
      />
    </div>
      
  </div>
</template>

<script>
import { mapActions, mapState } from "vuex";
import Homebox from "../../../components/Homebox.vue";
export default {
  name: "indexhome",
  components: {
    Homebox,
  },
  data() {
    return {
      ind: "",
    };
  },
  computed: {
    ...mapState(["list"]),
  },
  mounted() {
    this.GET_LIST();
  },

  methods: {
    ...mapActions(["GET_LIST"]),
    Godetail(id){
        this.$router.push({
            path:`/detail/${id}`
        })
    }
  },
};
</script>

<style lang="scss" scoped>
.home {
  width: 100%;
  height: 100%;
  .home-box {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
  }
}
</style>